﻿<!DOCTYPE html>
@model List<MyMVC.Model.Employee>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>修改数据</title>
</head>
<body>
    <form method="post" action="/Home/doupdate">
        <h1 style="text-align:center">修改数据</h1>
        @foreach (var item in Model)
      {
        <table align="center">
            <tr>
                <td>ID:</td>
                <td>
                    @item.EmpId
                </td>
            </tr>
            <tr>
                <td>头像:</td>
                <td>
                    <img src="@item.image" style="height:50px" width="100" />
                </td>
            </tr>
            <tr>
                <td>姓名:</td>
                <td>
                    <input name="EmpName" type="text" value="@item.EmpName" />
                </td>
            </tr>
            <tr>
                <td>年龄:</td>
                <td>
                    <input name="Age" type="text" value="@item.Age" />
                </td>
            </tr>
            <tr>
                <td>性别:</td>
                <td>
                    <input name="Sex" type="text" value="@item.Sex" />
                </td>
            </tr>
            <tr>
                <td>出生年月:</td>
                <td>
                    <input name="AddTime" type="text" value="@item.AddTime.ToString("yyyy/MM/dd")" />
                </td>
            </tr>
            <tr>
                <td>工资:</td>
                <td>
                    <input name="Wage" type="text" value="@item.Wage" />
                </td>
            </tr>
            <tr>
                <td>所属部门:</td>
                <td>
                    <input name="DepId" type="text" value="@item.department.DepName" />
                </td>
            </tr>
            <tr style="text-align:center">
                <td>
                    @*@Html.ActionLink("修改", "doupdate", new { id = item.EmpId })*@
                    <input type="submit" value="修改" />
                    <input type="button" value="返回" onclick="history.back(-1)" />
                </td>
            </tr>
        </table>

}
    </form>
</body>
</html>
